import Login from '../pages/Login.jsx';
import Register from '../pages/Register.jsx';
import BlogList from '../pages/BlogList.jsx';
import BlogEdit from '../pages/BlogEdit.jsx';

const routes = [
    {
        path: '/register',
        component: Register,
    },
    {
        path: '/login',
        component: Login,
    },
    {
        path: '/blog/list',
        component: BlogList,
        requireLogin: true,
    },
    {
        path: '/blog/edit/:id',
        component: BlogEdit,
        requireLogin: true,
    },
];

// CommonJS => module.exports 或 exports | require()
// ES6 => import  export
export default routes;
